﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ETRobocon.RaceTraking.GamePresentation
{
    /// <summary>
    /// Interaction logic for ClearStatusPanelControl.xaml
    /// </summary>
    public partial class ClearStatusPanelControl : UserControl, IClearMarkEffectView
    {
        public ClearStatusPanelControl()
        {
            InitializeComponent();
        }

        private readonly string plusStatement = @"";//CLEAR!!
        private readonly string minusStatement = @"減点!";
        #region IClearMarkEffectView Members

        public string MarkerName
        {
            get { return tbShortCutName.Text; }
            set { tbShortCutName.Text = value; }
        }

        public void Fire(int level, bool on)
        {
            if (level > 0)
            {
                tbClearedStatus.Text = plusStatement;
            }
            else if (level < 0)
            {
                tbClearedStatus.Text = minusStatement;
            }

            if (on)
            {
                tbClearedStatus.Visibility = System.Windows.Visibility.Visible;
                ClearedStatusBackImage.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                tbClearedStatus.Visibility = System.Windows.Visibility.Hidden;
                ClearedStatusBackImage.Visibility = System.Windows.Visibility.Hidden;
            }
        }

        public void Reset()
        {
            tbClearedStatus.Visibility = System.Windows.Visibility.Hidden;
            ClearedStatusBackImage.Visibility = System.Windows.Visibility.Hidden;
        }

        public void MoveTop(int delta)
        {
            throw new NotImplementedException();
        }

        public void MoveLeft(int delta)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
